{% extends "base.html" %}

{% block title %}
fastNIMeansDenoisingColored
{% endblock %}

{% block description %}
<p>Modification of <code>fastNlMeansDenoising</code> function for colored images.</p>
{% endblock %}

{% block signature %}
<pre>cv2.fastNlMeansDenoisingColored(src[, dst[, h[, hColor[, templateWindowSize[, searchWindowSize]]]]]) &rarr; dst</pre>
{% endblock %}

{% block parameters %}
<ul>
    <li><prmtr>src</prmtr> (<ptype>np.ndarray</ptype>): Input 8-bit 3-channel image.</li>
    <li><prmtr>dst</prmtr> (optional; <ptype>np.ndarray</ptype>): Output image of the same size and type as <code>src</code>.</li>
    <li><prmtr>h</prmtr> (optional; <ptype>float</ptype>): Parameter regulating filter strength for luminance component. Bigger <code>h</code> value perfectly removes noise but also removes image details, smaller <code>h</code> value preserves details but also preserves some noise. Default value is 3.</li>
    <li><prmtr>hColor</prmtr> (optional; <ptype>float</ptype>): The same as <code>h</code> but for color components. For most images value equals 10 will be enough to remove colored noise and do not distort colors. Default value is 3.</li>
    <li><prmtr>templateWindowSize</prmtr> (optional; <ptype>int</ptype>): Size in pixels of the template patch that is used to compute weights. Should be odd. Recommended/Default value 7 pixels.</li>
    <li><prmtr>searchWindowSize</prmtr> (optional; <ptype>int</ptype>): Size in pixels of the window that is used to compute weighted average for given pixel. Should be odd. Affects performance linearly: greater <code>searchWindowsSize</code> - greater denoising time. Recommended/Default value 21 pixels.</li>
</ul>
{% endblock %}

{% block explanation %}
<p>
    The function converts image to <a href="https://en.wikipedia.org/wiki/CIELAB_color_space">CIELAB</a> colorspace and then separately denoises L and AB components with given <code>h</code> parameters using <code>fastNlMeansDenoising</code> function.
</p>
{% endblock %}

{% block notes %}
<ul>
    <li>Performs image denoising using <a href="http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/">non-local means denoising algorithm</a> with several computational optimizations.</li>
    <li>Noise is expected to be a Gaussian white noise.</li>
</ul>

{% endblock %}

{% block references %}
<ul>
    <li><a href="https://docs.opencv.org/master/d1/d79/group__photo__denoise.html#ga03aa4189fc3e31dafd638d90de335617">OpenCV Documentation</a></li>
</ul>
{% endblock %}